package cn.anstone.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.anstone.mapper.RoleMapper;
import cn.anstone.pojo.Role;
import cn.anstone.service.RoleService;
import cn.anstone.util.MyResult;

/**
 * @author J.L.Lee
 * @date  Aug 15, 2017
 */
@Controller
public class RoleController {

	@Autowired
	RoleService roleService;
	
	@RequestMapping("/roles")
	@ResponseBody
	public MyResult getAllRole(){
		
		List<Role> list = roleService.getAllRole();
		
		return MyResult.ok(list);
	}
}
